IUGetIntl
IUGetIntl
Obtain handle to an international resource short rsrcID ; the ID to obtain a resource of type of type 'itl0',
'itl1' or 'itl2'.
Use IUGetIntl to obtain a handle leading to a structure containing international information from an 'itlx' resource. It contains the currency
format, decimal separator, and so forth.
rsrcID identifies the resource (type 'itlx') to read. It is one of:
0 get handle to Intl0Rec structure (currency, time. etc) 1 get handle to Intl1Rec structure (names of months, days, date-formatting options, etc.)
2 get handle to 'itl2' resource (used for string comparisions)
4 get handle to 'itl4' resource (used for tokenization
information)
Returns: a generic Handle. If rsrcID = 0, cast the handle to a Intl0Hndl. If rsrcID = 1, cast the handle to a Intl1Hndl, etc.
In System files older than System 4.1, there were two 'INTL' resources
which contained international formatting options. In System files 4.1 and
newer, 'itl0' and 'itl1' replace 'INTL' 0 and 'INTL' 1. If your application
uses IUGetIntl to get the appropriate international resource, then you will not have any problems. However, your application cannot use calls to
GetResource to get and modify 'INTL' 0 and/or 'INTL' 1 resources instead of IUGetIntl. The 'INTL' 0 and 1 resources still exist in the System file, but should not be used or modified by your application.
Remeber to verify that thePort and thePort.txFont are set correctly before
using any of the international resources, or the Binary-Decimal routines. The IUGetIntl call is commonly used as a step in modifying the output of usage).
Example
#include <Packages.h>
/* Make sure the font is set properly in thePort, then... */
myDecimal = (** myHandle).decimalPt; /* as in 1.234 in English */
myThousands = (** myHandle).thousSep; /* as in 1,234,567 in English */
myList = (** myHandle).listSep; /* as in (3;4;5) in English */